/*
 * #%L
 * BroadleafCommerce Open Admin Platform
 * %%
 * Copyright (C) 2009 - 2016 Broadleaf Commerce
 * %%
 * Licensed under the Broadleaf Fair Use License Agreement, Version 1.0
 * (the "Fair Use License" located  at http://license.broadleafcommerce.org/fair_use_license-1.0.txt)
 * unless the restrictions on use therein are violated and require payment to Broadleaf in which case
 * the Broadleaf End User License Agreement (EULA), Version 1.1
 * (the "Commercial License" located at http://license.broadleafcommerce.org/commercial_license-1.1.txt)
 * shall apply.
 * 
 * Alternatively, the Commercial License may be replaced with a mutually agreed upon license (the "Custom License")
 * between you and Broadleaf Commerce. You may not use this file except in compliance with the applicable license.
 * #L%
 */
/*!
 * BLC Admin Styles adapted for:
 * jQuery QueryBuilder 2.2.0
 * Copyright 2014-2015 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
 * Licensed under MIT (http://opensource.org/licenses/MIT)
 */

.query-builder .rules-group-container, .query-builder .rule-container, .query-builder .rule-placeholder {
    position: relative;
    margin: 4px 0;
    /*border-radius: 5px;*/
    padding: 5px;
    border: 1px solid #EEE;
    background: rgba(0,0,0,0.04);
}

.query-builder .rule-container .rule-filter-container,
.query-builder .rule-container .rule-operator-container,
.query-builder .rule-container .rule-value-container, .query-builder .error-container, .query-builder .drag-handle {
    display: block;
    vertical-align: middle;
    float: left;
    margin: 0 5px 0 0;
}

.query-builder .rules-group-container {
    background-color: rgba(0,0,0,0.03);
    padding: 20px;
    width: 100%;
}
.query-builder .rules-group-container .rules-group-header {
    margin-bottom: -10px;
    padding-bottom: 10px;
}

.query-builder .rules-group-container .rules-list {
    list-style: none;
    padding: 0 0 0 15px;
    margin: 0;
}
.query-builder .rule-container .rule-value-container {
    border-left: none;
}
.query-builder .rule-container .rule-value-container .rule-val-sep {
    padding: 5px;
}
.query-builder .rule-container .rule-value-container label {
    margin-bottom: 0;
    font-weight: normal;
}
.query-builder .rule-container .rule-value-container label.block {
    display: block;
}
.query-builder .rule-container select, .query-builder .rule-container input[type=text], .query-builder .rule-container input[type=number] {
    padding: 7px;
    margin: 0px;
}
.query-builder .error-container {
    display: none;
    cursor: help;
    color: #F00;
}
.query-builder .has-error {
    background-color: #FDD;
    border-color: #F99;
}
.query-builder .has-error .error-container {
    display: inline-block !important;
}
.has-error .rule-builder-container {
    border-color: #D20A33 !important;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
}
.has-error .rule-builder-container input {
    border-color: #D8D5D0;
    -webkit-box-shadow: none;
    box-shadow: none;
}
#field-targetItemCriteria .error {
    margin-top: -10px;
}
.query-builder .rules-list > *:before, .query-builder .rules-list > *:after {
    content: '';
    position: absolute;
    left: -10px;
    width: 10px;
    height: calc(50% + 4px);
    border: solid #CCC;
}
.query-builder .rules-list > *:before {
    top: -4px;
    border-width: 0 0 2px 2px;
}
.query-builder .rules-list > *:after {
    top: 50%;
    border-width: 0 0 0 2px;
}
.query-builder .rules-list > *:first-child:before {
    top: -12px;
    height: calc(50% + 14px);
}
.query-builder .rules-list > *:last-child:before {
    /*border-radius: 0 0 0 4px;*/
}
.query-builder .rules-list > *:last-child:after {
    display: none;
}

.query-builder .error-container + .tooltip .tooltip-inner {
    color: #F99 !important;
}

.query-builder p.filter-description {
    margin: 5px 0 0 0;
    background: #D9EDF7;
    border: 1px solid #BCE8F1;
    color: #31708F;
    border-radius: 5px;
    padding: 2.5px 5px;
    font-size: 0.8em;
}

.query-builder .drag-handle {
    cursor: move;
    vertical-align: middle;
    margin-left: 5px;
}
.query-builder .dragged {
    opacity: 0.5;
}
.query-builder .rule-placeholder {
    border: 1px dashed #BBB;
    opacity: 0.7;
}

.query-builder-rules-container .launch-modal-rule-builder {
    margin-top: 10px;
}

.query-builder-rules-container .launch-modal-rule-builder span {
    padding-left: 10px;
}

.query-builder-rules {
    width: 100%;
}

.query-builder-rules .remove-row {
    text-align: center;
    color: #9a9a9a;
    font-size: 21px;
    padding: 5px;
    border: none;
    background-color: transparent;
    cursor: pointer;
}

.query-builder-rules .remove-row.disabled {
    background: none !important;
}

.query-builder-rules .group-conditions label {
    display: inline-block;
    margin: 5px;
}

.query-builder-rules-container .query-builder-rules .group-actions button {
    background-color: rgba(0,0,0,0.04);
    color: #9a9a9a;
    font-size: 13px;
}

.query-builder-rules .rules-group-header-span {
    margin-left: 3px;
}

.query-builder-rules .rules-group-header-item-qty {
    min-width: 40px;
    width: auto;
    margin: 5px 0 5px 3px;
    text-align: center;
}

.query-builder-rules .query-builder-selectize-input {
    min-width: 200px;
}

.query-builder-rules-container .query-builder-rules > .query-builder-selectize-input {
    min-width: 200px;
}

.query-builder-rules .query-builder-all-any-wrapper {
    display: inline-block;
    margin: 5px 0;
}

.query-builder-rules .toggle-container {
    color: #404040;
    /*height: 2.7em;*/
    height:34px;
    width: 100px;
    background: rgba(0,0,0,0.03);
}

.query-builder-rules .toggle-container input {
    display:none;
}

.query-builder-rules input[type="radio"].toggle {
    position: absolute;
    left: -99em;
    margin: 20px auto;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
}

.query-builder-rules input[type="radio"].toggle + label {
    display:inline-block;
    text-align:center;
    padding:5px 0px;
    width:3.1em;
    line-height: 16px;
    font-size: 12px;
    color: #9a9a9a;
    text-align: center;
    /*text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);*/
    cursor: pointer;
    height:28px;
}

/*input[type="radio"].toggle:checked + label,*/
.query-builder-rules input[type="radio"].toggle.checked + label {
    background-color:#404040;
    color:#F7F7F7;
    background: #94AF39;
    border-radius: 3px;
    height:24px;
}

/* added for rule builder button */
.add-and-button {
    height: 45px;
}

.query-builder-rules-header {
    font-size: 1em;
}

.read-only-rule {
    padding: 5px 10px;
    background-color: #eeeeee;
}

.read-only-rule span {
    font-size: 12px;
    padding-right: 4px;
}

.read-only-rule span.readable-rule-field {
    /*font-weight: bold;*/
}

.read-only-rule span.readable-no-rule {
    font-style: italic;
}
.read-only-rule ul {
    list-style-type: none;
    padding-left: 20px;
}
.read-only-rule ul li {
    text-indent: -10px;
}
.rule-modal-zone {
    position: relative;
}
.rule-modal-zone > .launch-modal-rule-builder {
    position: absolute;
    top: 10px;
    right: 34px;
    cursor: pointer;
    display: none;
    color: rgba(0,0,0,0.5);
}
.rule-modal-zone > .clear-rule-builder {
    position: absolute;
    top: 10px;
    right: 14px;
    cursor: pointer;
    display: none;
    color: rgba(0,0,0,0.5);
}

.rule-modal-zone.can-edit .launch-modal-rule-builder:hover, .rule-modal-zone.can-edit .clear-rule-builder:hover {
    color: rgba(0,0,0,1);

}
.rule-modal-zone.can-edit:hover > .launch-modal-rule-builder,
.rule-modal-zone.can-edit:hover > .clear-rule-builder {
    display: block;
}

.rule-radio-label {
    display: inline-block;
    padding: 5px;
}

/* filter builder styles */
.filter-radio-label {
    display: inline-block;
    padding-left: 15px;
}

.query-builder-filters-container .group-conditions, .query-builder-rules-container .group-conditions {
    height: 40px;
    vertical-align: baseline;
    /*line-height: 40px;*/
    /*text-transform: uppercase;*/
    font-weight: 500;
    font-size: 12px;
}

.query-builder-filters-container hr, .query-builder-rules-container hr {
    margin-top: 0;
}

.query-builder-filters-container .rules-group-container, .query-builder-rules-container .rules-group-container {
    border: none;
    padding: 0;
    line-height: 34px;
    background-color: transparent;
}

.query-builder-filters-container .rule-container {
    border: none;
    padding: 10px 20px;
    line-height: 34px;
}

.query-builder-rules-container .rule-container {
    border: none;
    padding: 10px 20px;
    line-height: 0;
}

.launch-link {
    color: #94AF39;
    cursor: pointer;
}

.query-builder-filters-container .rule-container:before, .query-builder-filters-container .rule-container:after,
.query-builder-rules-container .rule-container:before, .query-builder-rules-container .rule-container:after{
    content: none;
}

.query-builder-filters-container .query-builder-rules .remove-row, .query-builder-rules-container .query-builder-rules .remove-row {
    padding: 0;
    position: absolute;
    right: 16px;
    top: 15px;
    z-index: 10;
    width: 20px;
}

.query-builder-filters-container .query-builder .rule-container .rule-value-container {
    border-left: none;
    padding-left: 7px;
}

.query-builder-filters-container .query-builder .rule-container .rule-value-container input.form-control,
.query-builder-rules-container .query-builder .rule-container .rule-value-container input.form-control{
    height: 34px;
    vertical-align: middle;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    border-radius: 0;
}

.query-builder-filters-container .query-builder .rules-group-container .rules-list,
.query-builder-rules-container .query-builder .rules-group-container .rules-list{
    list-style: none;
    padding: 0 15px 15px;
    margin: 0;
}
.query-builder-filters-container .read-only {
    max-width: 620px;
    vertical-align: middle;
}

.filter-apply-button {
    padding: 0 12px;
}

.button-group .filter-button {
    padding-left: 10px;
    padding-right: 10px;
}

.clear-filters i {
    font-size: 16px;
    padding-top: 10px;
}

.query-builder-filters-container .query-builder .has-error .error-container {
    display: none !important;
}

.query-builder-filters-container .query-builder-rules .query-builder-selectize-input {
    min-width: 200px;
    height: 42px;
    line-height: 42px;
}

.query-builder-filters-container .query-builder-rules .query-builder-selectize-input.selectize-control {
    height: 34px;
}

.query-builder-filters-container .selectize-input, .query-builder-filters-container .selectize-control.multi .selectize-input.has-items,
.query-builder-rules-container .selectize-input, .query-builder-rules-container .selectize-control.multi .selectize-input.has-items {
    padding: 0;
}

.query-builder-filters-container .selectize-dropdown-content,
.query-builder-rules-container .selectize-dropdown-content{
    background-color: white;
    border: 1px solid #d0d0d0;
}

.query-builder-filters-container .rules-list .no-filters {
    height: 54px;
}

.query-builder-filters-container .query-builder-rules .edit-row {
    padding: 0;
    position: absolute;
    right: 42px;
    top: 17px;
    text-align: center;
    color: #9a9a9a;
    font-size: 18px;
    border: none;
    background-color: transparent;
    cursor: pointer;
}

.query-builder-rules-header {
    margin: 0;
    background-color: #FCFBF9;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 15px;
    width: 100%;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #757575;
}
.query-builder-rules-container {
    padding: 5px 10px 20px;
}

.query-builder-rules-container .rules-group-container {
    background-color: transparent;
}

.rule-builder-with-quantity, .rule-builder-simple, .rule-builder-simple-time {
    margin-bottom: 10px;
    background-color: white;
    border: 1px solid #D8D5D0;
    /*-moz-box-shadow: rgba(0,0,0,0.1) 0px 2px 5px;*/
    /*-webkit-box-shadow: rgba(0,0,0,0.1) 0px 2px 5px;*/
    /*box-shadow: rgba(0,0,0,0.1) 0px 2px 5px;*/
}

.query-builder-rules-container .rule-filter-container {
    width: 30%;
}
.query-builder-rules-container .rule-operator-container {
    width: 25%;
}
.query-builder-rules-container .rule-value-container {
    width: 40%;
}

.query-builder-filters-container .rule-filter-container {
    width: 30%;
}
.query-builder-filters-container .rule-operator-container {
    width: 24%;
}
.query-builder-filters-container .rule-value-container {
    width: 35%;
}
.rule-container:after {
    content: "";
    display: table;
    clear: both;
}


.query-builder-filters-container .query-builder-rules .group-actions {
    margin-right: 15px;
}

.query-builder-filters-container {
    margin-top: -11px;
}

.query-builder-filters-container .rules-group-body .rule-filter-container .filter-text {
    display: inline-block;
    margin-top: 2px;
}

.query-builder-filters-container .read-only:before {
    content: '\2022';
    font-size: 24px;
    padding: 4px;
    vertical-align: bottom;
}

.query-builder-filters-container .filter-group-header-label {
    margin: 15px !important;
    color: #2c2c2c;
}

.rule-reset {
    margin: 10px;
}

.field-label.error {
    margin: 10px;
}
